﻿using System.Collections.Generic;
using CID.Domain.Development;
using CID.Domain.Operations;

namespace CID.Domain.Infrastructure
{
    public interface IDefinition : IEntity
    {
        IEnumerable<IDefaultParameterValue> DefaultParameterValues { get; }
        IEnumerable<IEnvironmentParameterValue> EnvironmentParameterValues { get; }

        IDefaultParameterValue GetDefaultParameterValue(IParameter parameter);

        IEnvironmentParameterValue GetEnvironmentParameterValue(IParameter parameter, IEnvironment environment);
        IEnvironmentParameterValue AddEnvironmentParameterValue(IParameter parameter, IEnvironment environment);
        void RemoveEnvironmentParameterValue(IParameter parameter, IEnvironment environment);
        void RemoveEnvironmentParameterValue(IEnvironmentParameterValue parameterValue);
    }

    public interface IActivationDeactivationDefinition : IDefinition
    {
        IComponent Component { get; }
        IActivationTemplate ActivationTemplate { get; set; }
        IDeactivationTemplate DeactivationTemplate { get; set; }

        IEnumerable<IParameterValue> GetActivationParamaterValues(IEnvironment environment);
        IEnumerable<IParameterValue> GetDeactivationParamaterValues(IEnvironment environment);
    }

    public interface IDeploymentDefinition : IDefinition
    {
        IVersion Version { get; }
        IDeploymentTemplate DeploymentTemplate { get; set; }
        IEnumerable<IParameterValue> GetDeploymentParamaterValues(IEnvironment environment);
    }
}
